// 封装请求函数
import config from './config';

export default (url, data={},method='GET') => {
	return new Promise((resolve, reject)=>{
		uni.request({
		    url: config.host + url, 
		    data,
		    header: {},
			method,
		    success: res => {
			   resolve(res.data);
		    }
		});
	});
};